// 系统设置相关类型定义
export interface PersonalSettings {
  id: string;
  name: string;
  email: string;
  phone: string;
  avatar?: string;
  language: string;
  timeZone: string;
  department?: string;
  position?: string;
}

export interface NotificationSettings {
  id: string;
  email: {
    newTask: boolean;
    taskUpdate: boolean;
    comment: boolean;
    system: boolean;
  };
  push: {
    newTask: boolean;
    taskUpdate: boolean;
    comment: boolean;
    system: boolean;
  };
  sms: {
    newTask: boolean;
    taskUpdate: boolean;
    comment: boolean;
    emergency: boolean;
  };
  audio: {
    enabled: boolean;
    volume: number;
    voicePrompt: boolean;
    newMessage: boolean;
    taskNotification: boolean;
    systemNotification: boolean;
  };
  dailySummary: string;
  weeklySummary: string;
}

export interface SecuritySettings {
  id: string;
  twoFactorAuth: boolean;
  loginAlerts: boolean;
  sessionTimeout: number;
  passwordExpiry: number;
  failedLoginAttempts: number;
  ipWhitelist?: string[];
}

export interface SystemConfigurations {
  id: string;
  language: string;
  timeZone: string;
  theme: 'light' | 'dark' | 'auto';
  autoSave: boolean;
  backupInterval: number;
  maxFileSize: number;
  allowedFileTypes: string[];
}

export interface ChangePasswordRequest {
  currentPassword: string;
  newPassword: string;
  confirmPassword: string;
}

export interface ResetSettingsRequest {
  type: 'personal' | 'notification' | 'security' | 'system';
}

export interface SettingsResponse<T> {
  success: boolean;
  code: number;
  message: string;
  data: T;
}

export interface GetSettingsRequest {
  type?: 'personal' | 'notification' | 'security' | 'system';
}

export type SettingsType = PersonalSettings | NotificationSettings | SecuritySettings | SystemConfigurations;